<template>
  <el-form-item v-show="isShow" :label="i18nt('designer.setting.fontColor')">
    <el-color-picker v-model="optionModel.fontColor" />
  </el-form-item>
</template>

<script>
export default {
  name: 'FontColorEditor',
  inject: ['getDesignerConfig'],
  props: {
    designer: Object,
    selectedWidget: Object,
    optionModel: Object
  },
  computed: {
    isShow() {
      // 当组件为 button , 并且 isTitle 为 0 时，不显示
      if (
        this.selectedWidget &&
        this.selectedWidget.type === 'button' &&
        this.selectedWidget.options.isTitle === 0
      ) {
        return false
      }

      return true
    }
  }
}
</script>

<style lang="scss" scoped></style>
